import React from "react";
import "./App.css";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
import PostListPage from "./page/post/PostListPage";
import PostDetailPage from "./page/post/PostDetailPage";
import PostEditPage from "./page/post/PostEditPage";
import { Store } from "redux";

interface Props {
    store: Store;
}
function App({ store }: Props) {
    return (
        <div className="App">
            <Router>
                <Switch>
                    <Route
                        exact={true}
                        path={"/post"}
                        component={PostListPage}
                    />
                    <Route
                        exact={true}
                        path={"/post/:id"}
                        component={PostDetailPage}
                    />
                    <Route
                        exact={true}
                        path={"/editPost/:id"}
                        component={PostEditPage}
                    />
                </Switch>
            </Router>
        </div>
    );
}

export default App;
